public class demo30 {
/*
    class Solution {
        public String addBinary(String a, String b) {
            Stack<Character> stack = new Stack<>();
            int i = a.length() - 1;
            int j = b.length() - 1;
            int carry = 0;
            while (i >= 0 || j >= 0 || carry > 0) {
                int digitA = i >= 0? a.charAt(i) - '0' : 0;
                int digitB = j >= 0? b.charAt(j) - '0' : 0;
                int sum = digitA + digitB + carry;
                carry = sum / 2;
                stack.push((char) (sum % 2 + '0'));
                //字符 '0' 的 ASCII 码是 48,将 sum % 2 的结果（0 或 1）加上 '0' 的 ASCII 码时，实际上是将数字 0 或 1 转换为对应的字符 '0' 或 '1'
                i--;
                j--;
            }
            StringBuffer result = new StringBuffer();
            while (!stack.isEmpty()) {
                result.append(stack.pop());
            }
            return result.toString();
        }
    }

*/

}
